package com.kaishengit.pojo;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "t_project")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Project {

	private String id;
	private String name;
	private String content;
	private String createtime;

	private Set<Role> roleList;
	private Set<News> newsList;
	private Set<Goal> goalList;
	private Set<Idea> ideaList;
	private Set<Document> documentList;
	private Set<Filetype> filetypeList;
	private Set<Linkman> linkmanList;

	@Id
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getCreatetime() {
		return createtime;
	}

	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}

	@OneToMany(mappedBy = "project")
	public Set<Role> getRoleList() {
		return roleList;
	}

	public void setRoleList(Set<Role> roleList) {
		this.roleList = roleList;
	}

	@ManyToMany(mappedBy = "projectList")
	public Set<News> getNewsList() {
		return newsList;
	}

	public void setNewsList(Set<News> newsList) {
		this.newsList = newsList;
	}

	@OneToMany(mappedBy = "project")
	public Set<Goal> getGoalList() {
		return goalList;
	}

	public void setGoalList(Set<Goal> goalList) {
		this.goalList = goalList;
	}

	@OneToMany(mappedBy = "project")
	public Set<Idea> getIdeaList() {
		return ideaList;
	}

	public void setIdeaList(Set<Idea> ideaList) {
		this.ideaList = ideaList;
	}

	@OneToMany(mappedBy = "project")
	public Set<Document> getDocumentList() {
		return documentList;
	}

	public void setDocumentList(Set<Document> documentList) {
		this.documentList = documentList;
	}

	@OneToMany(mappedBy = "project")
	public Set<Filetype> getFiletypeList() {
		return filetypeList;
	}

	public void setFiletypeList(Set<Filetype> filetypeList) {
		this.filetypeList = filetypeList;
	}

	@OneToMany(mappedBy = "project")
	public Set<Linkman> getLinkmanList() {
		return linkmanList;
	}

	public void setLinkmanList(Set<Linkman> linkmanList) {
		this.linkmanList = linkmanList;
	}

}
